package list;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

public class TestDemo {
    public  static ArrayList<Character> func(String str1, String str2){
        ArrayList<Character> arrayList4 = new ArrayList<>();
        for (int i = 0; i < str1.length(); i++) {
                char ch = str1.charAt(i);
                if (!str2.contains(ch + "")) {
                    arrayList4.add(ch);
                }

        }
        return arrayList4;
    }
    public static void main(String[] args) {
        String str1 = "welcome to cvte";
        String str2 = "come";
        List<Character> ret = func(str1, str2);
        for (char ch : ret) {
            System.out.print(ch);
        }
    }
    public static void main33(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        arrayList.add(3);
        arrayList.add(30);
        arrayList.add(12);
        arrayList.add(7);
        for (int i = 0; i < arrayList.size() ; i++) {
            System.out.println(arrayList.get(i));

        }
    }
    public static void main2(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        arrayList.add(3);
        arrayList.add(30);
        arrayList.add(12);
        arrayList.add(7);
        System.out.println(arrayList);//[3, 30, 12, 7]
        ArrayList<Number> arrayList1 = new ArrayList<>(arrayList);
        arrayList1.add(8);
        System.out.println(arrayList1);//[3, 30, 12, 7, 8]
        System.out.println("---------");
        List<Integer> list = arrayList.subList(0,2);
        System.out.println(list);//[3, 30]
        list.set(0,99);
        System.out.println(list);//[99, 30]
        System.out.println(arrayList);//[99, 30, 12, 7]
    }
    public static void main1(String[] args) {
        Mylist list  = new Mylist();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        list.add(5);
        list.add(6);
        list.add(7);
       // System.out.println(list.useSize);

//        list.add(7,0);
//        list.set(1,9);
//        list.remove(7);
        System.out.println(list.indexOf(6));
        list.display();
    }
}
